home *** CD-ROM | disk | FTP | other *** search
/ MacAddict 114 / macaddict114.cdr / Software / Utilities / macam.0.8.4.dmg / macam sources / component_specific / QTPanel.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-05-22  |  3.5 KB  |  83 lines

  1. /*
  2.     macam - webcam app and QuickTime driver component
  3.     Copyright (C) 2002 Matthias Krauss (macam@matthias-krauss.de)
  4.  
  5.     This program is free software; you can redistribute it and/or modify
  6.     it under the terms of the GNU General Public License as published by
  7.     the Free Software Foundation; either version 2 of the License, or
  8.     (at your option) any later version.
  9.  
  10.     This program is distributed in the hope that it will be useful,
  11.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.     GNU General Public License for more details.
  14.  
  15.     You should have received a copy of the GNU General Public License
  16.     along with this program; if not, write to the Free Software
  17.     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  18.  $Id: QTPanel.h,v 1.1.1.1 2002/05/22 04:57:15 dirkx Exp $
  19. */
  20.  
  21. #ifndef    _QT_SG_PANEL_
  22. #define    _QT_SG_PANEL_
  23.  
  24. #include <Carbon/Carbon.h>
  25. #include <QuickTime/QuickTime.h>
  26. #include <QuickTime/QuickTimeComponents.h>
  27. #include <QuickTime/QuickTimeComponents.k.h>
  28. #include "GlobalDefs.h"
  29.  
  30.  
  31. @class MyBridge,MyCameraCentral;
  32.  
  33. //Our Globals struct
  34.  
  35. typedef struct SGPGlobals {
  36.     ComponentInstance self;            //Our instance - just to know (no cases we need it yet)
  37.     short resRef;                //Reference to our resource file
  38.     MyBridge* bridge;                //Reference to the vdig's bridge - we just steal the ref
  39.     MyCameraCentral* central;            //The central - we own it!
  40.     SeqGrabComponent grabber;            //The sequence Grabber component that owns us
  41. } SGPGlobals;
  42.  
  43. typedef SGPGlobals** sgpnGlobals;
  44.  
  45. //Main Entry
  46.  
  47. pascal ComponentResult sgpnMainEntry (ComponentParameters *params, Handle storage);
  48.  
  49. //Function Dispatcher
  50.  
  51. bool sgpnLookupSelector(short what,ProcPtr* ptr,ProcInfoType* info);
  52.  
  53. //Required Generic Component Functions
  54.  
  55. pascal ComponentResult sgpnRegister(sgpnGlobals storage);
  56. pascal ComponentResult sgpnOpen(sgpnGlobals storage, ComponentInstance self);
  57. pascal ComponentResult sgpnClose(sgpnGlobals storage, ComponentInstance self);
  58. pascal ComponentResult sgpnCanDo(sgpnGlobals storage, short ftnNumber);
  59. pascal ComponentResult sgpnVersion(sgpnGlobals storage);
  60.  
  61. //Sequence Grabber Panel Component general fuctions
  62.  
  63. pascal ComponentResult sgpnSetGrabber(sgpnGlobals storage, SeqGrabComponent grabber);
  64. pascal ComponentResult sgpnCanRun(sgpnGlobals storage, SGChannel channel);
  65. pascal ComponentResult sgpnSetResFile(sgpnGlobals storage, short resRef);
  66. pascal ComponentResult sgpnGetDITL(sgpnGlobals storage, Handle* ditl);
  67. pascal ComponentResult sgpnInstall(sgpnGlobals storage, SGChannel channel, DialogRef, short itemOffset);
  68. pascal ComponentResult sgpnRemove(sgpnGlobals storage, SGChannel channel, DialogRef, short itemOffset);
  69.  
  70. //Sequence Grabber Panel Component event handling functions
  71.  
  72. pascal ComponentResult sgpnItem(sgpnGlobals storage, SGChannel channel, DialogRef, short itemOffset, short itemNum);
  73. pascal ComponentResult sgpnEvent(sgpnGlobals storage, SGChannel channel, DialogRef, short itemOffset, const EventRecord* evt,
  74.                                  short* itemHit, Boolean* handled);
  75. pascal ComponentResult sgpnValidateInput(sgpnGlobals storage, Boolean* ok);
  76.  
  77. //Sequence Grabber Panel Component settings fuctions
  78.  
  79. pascal ComponentResult sgpnGetSettings(sgpnGlobals storage, SGChannel c, UserData* ud, long flags);
  80. pascal ComponentResult sgpnSetSettings(sgpnGlobals storage, SGChannel c, UserData ud, long flags);
  81.  
  82. #endif _QT_PANEL_
  83.